using System.Linq;

namespace Kiwi.Container.Wcf
{
    public static class ContainerBuilderExtensions
    {
        public static IContainerBuilder EnablePerWcfRequestContainers(this IContainerBuilder builder)
        {
            if (!builder.Extensions.Any(a => a is IWcfRequestContainerActivator))
            {
                builder.Extensions.Add(new WcfRequestContainerActivator());
            }
            return builder;
        }
    }
}